import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

//读出汉字(字节流)
public class Demo_6 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("./AAA1.txt")){
            while(true){
                byte[] buffer = new byte[512];
                int n = inputStream.read(buffer);
                if(n==-1){
                    break;
                }
                String s =new String(buffer,0,n);
                System.out.println(s);
            }
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
